package com.schoolET.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品信息
 * </p>
 *
 * @author lin
 * @since 2024-05-31
 */
@Data
@ToString
@NoArgsConstructor
@ApiModel(value = "Goods对象", description = "商品信息")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("微信id")
    private Integer wechatId;

    @ApiModelProperty("图片")
    private String picture;

    @ApiModelProperty("主题")
    private String theme;

    @ApiModelProperty("描述")
    private String goodsDescribe;

    @ApiModelProperty("价格")
    private Long price;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("有效字段")
    private Integer flag;



    public Goods(Integer wechatId, String picture, String theme, String goodsDescribe, Long price, String address) {
        this.wechatId = wechatId;
        this.picture = picture;
        this.theme = theme;
        this.goodsDescribe = goodsDescribe;
        this.price = price;
        this.address = address;
    }
}
